import http from 'service/util/http'

export default {
    // 验证手机号是否注册
    checkMobile(data) {
        return http.post('/account/check/mobile', data, ['mobile'])
    },
    // 注册
    register(data) {
        return http.post('/account/register', data, ['mobile', 'smsCode', 'password', 'inviteCode'])
    },
    // 忘记密码
    forgetPwd(data) {
        return http.post('/account/forget/pwd', data, ['mobile', 'smsCode', 'password'])
    },
    // 修改密码
    modifyPwd(data) {
        return http.post('/account/modify/pwd', data, ['userId', 'oldPwd', 'newPwd'])
    },
    // 登录
    login(data) {
        return http.post('/account/login', data, ['mobile', 'password'])
    },
    // 退出登录
    logout(data) {
        return http.post('/account/logout', data, ['userId'])
    }
}